package cn.ljy.authority.dao.mapper;

import cn.ljy.authority.dao.BaseMapper;
import cn.ljy.authority.model.SysShop;
import cn.ljy.authority.model.SysUser;
import cn.ljy.authority.model.SysWechatUser;
import cn.ljy.authority.model.query.SysUserQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SysWechatUserMapper extends BaseMapper<SysWechatUser> {

    SysWechatUser selectByOpenId(@Param("openId") String openId);
    SysUser selectByUsername(String username);

    List<SysUser> selectList(SysUserQuery query);
    int insert(SysUser user);
    int insert(SysWechatUser user);


    int update(SysUser user);

    int updateStatus(@Param("id") Long id, @Param("status") Integer status);

    int delete(Long id);

    int deleteByUserId(Long userId);

    SysWechatUser selectByUserId(Long userId);
}